#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: liang kang
@contact: gangkanli1219@gmail.com
@time: 2018/5/27 13:36
@desc: 
"""
import itk
from itkwidgets import view

dicomreader = itk.ImageSeriesReader[itk.Image.SS3].New()
dicomreader.GlobalWarningDisplayOff()
names = itk.GDCMSeriesFileNames.New()
names.SetInputDirectory(
    'D:\\data\\lidc\\b\\LIDC-IDRI-0104\\1.3.6.1.4.1.14519.5.2.1.6279.6001.888517498954149177086283916722\\000000')
names.Update()
dicomreader.SetFileNames(names.GetInputFileNames())
gdcmio = itk.GDCMImageIO.New()
dicomreader.SetImageIO(gdcmio)
dicomreader.Update()
image = dicomreader.GetOutput()
view(image)
